Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
redux-persist-crosstab
Advanced tools
Add cross tab syncing to your [redux](https://github.com/gaearon/redux) app with 1 line. This tiny module listens to the window for [redux-persist](https://github.com/rt2zz/redux-persist) storage events. When an event occurs it will dispatch a rehydrate a
Add cross tab syncing to your redux app with 1 line. This tiny module listens to the window for redux-persist storage events. When an event occurs it will dispatch a rehydrate action.
import { createStore, compose } from 'redux'
import { persistStore, autoRehydrate } from 'redux-persist'
import crosstabSync from 'redux-persist-crosstab'
const finalCreateStore = compose(autoRehydrate())(createStore)
const store = finalCreateStore(reducer)
const persistor = persistStore(store, {})
crosstabSync(persistor)
To blacklist some portion of state, for example if you want to avoid syncing route state:
crosstabSync(persistor, {blacklist: ['routeReducerKey']})
Redux Persist does a shallow merge of state during rehydration. This means that if state changes on two tabs simulataneously, it is possible that legitimate state will be lost in the merge. In most cases this will not be an issue. One scenario where this could happen is if both tabs are listening on a socket and they both receive a message at the same time. If you have this type of set up you will either need to blacklist the relevant reducers or implement a custom rehydration handler that takes into account the nuances of this situation.
FAQs
Add cross tab syncing to your [redux](https://github.com/gaearon/redux) app with 1 line. This tiny module listens to the window for [redux-persist](https://github.com/rt2zz/redux-persist) storage events. When an event occurs it will dispatch a rehydrate a
The npm package redux-persist-crosstab receives a total of 161 weekly downloads. As such, redux-persist-crosstab popularity was classified as not popular.
We found that redux-persist-crosstab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.